//
//  UILabel + Extension.swift
//  Residual_mem
//
//  Created by 武振磊 on 16/7/19.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

extension UILabel {
    ///   遍历构造函数
    ///   - parameter title:    text
    ///   - parameter color:    textColor 默认是深灰色
    ///   - parameter fontSize: font 默认是14号字体
    ///   - returns: UILabel
    convenience init(title: String, color: UIColor = UIColor.darkGrayColor(), fontSize:CGFloat = 14){
    self.init()

    text = title
    textAlignment = NSTextAlignment.Center
    font = UIFont.systemFontOfSize(fontSize)
    numberOfLines = 0
    textColor = color
    sizeToFit()
    }
}